import request from '@/utils/request';
import store from "@/store";

const env = import.meta.env.MODE || 'development';
const prefix = '';

// 列表 /apiapp/v1/product_sn/list
export function product_snListApi (params) {
  return request({
    url: `${prefix}/apiapp/v1/product_sn/list`,
    method: 'get',
    params
  });
}

// 详情 /apiapp/v1/product_sn/details
export function product_snDetailApi (params) {
  return request({
    url: `${prefix}/apiapp/v1/product_sn/details`,
    method: 'get',
    params
  });
}

// 新增 /apiapp/v1/product_sn/create
export function product_snCreateApi (data) {
  return request({
    url: `${prefix}/apiapp/v1/product_sn/create`,
    method: 'post',
    data
  });
}

// 编辑 /apiapp/v1/product_sn/edit
export function product_snEditApi (data) {
  return request({
    url: `${prefix}/apiapp/v1/product_sn/edit`,
    method: 'post',
    data
  });
}

// 删除 /apiapp/v1/product_sn/delete
export function product_snDeleteApi (data) {
  return request({
    url: `${prefix}/apiapp/v1/product_sn/delete?id=${data.id}`,
    method: 'post',
    data
  });
}

// 追溯日志 /apiapp/v1/product_sn/log
export function product_snLogeApi (data) {
  return request({
    url: `${prefix}/apiapp/v1/product_sn/log?id=${data.id}`,
    method: 'post',
    data
  });
}
